package com.unnamed.collisions.geometry;
import java.util.List;
import java.util.concurrent.LinkedBlockingQueue;


public class PolygonCollider implements Runnable{
	LinkedBlockingQueue<Collision> collisions;
	Thread thread;
	
	public PolygonCollider(){
		collisions = new LinkedBlockingQueue<Collision>();
		
		thread = new Thread(this);
		
		thread.start();
	}

	@Override
	public void run() {
		while(true){
			if(collisions.size()>0){
				collisions.poll().getPoints();
				//System.out.println(collisions.size());
			}
		}
	}
	
	public void add(Collision collision){
		collisions.add(collision);
	}
	public int getRemaining(){
		return collisions.size();
	}
}
